package com.sunjy.demo1.feign;

import com.sunjy.common.domain.ApiResponseT;
import com.sunjy.demo1.feign.feignFallBack.HystrixClientFallback;
import com.sunjy.demo1.form.PersonForm;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther: sunjy
 * @Date: 2018/10/22 17:07
 * @Description:
 */
@FeignClient(name="demo2",fallback = HystrixClientFallback.class)
public interface TestPersonFeign {


    @RequestMapping(value = "/hystrix/test/{id}", method = RequestMethod.GET)
     public ApiResponseT<?> findOnePerson(@PathVariable("id") Integer id,@RequestParam(value = "name")String name);


	
    @RequestMapping(value = "/hystrix/test1", method = RequestMethod.POST)
	public ApiResponseT<?> findPostPerson(@RequestBody PersonForm personForm);



}
